﻿@using GdHotel.Data.Meta.Models
@using GdHotel.Web.Models
@model ShowModel

@section head{
    <link rel="stylesheet" href="@Url.Content("~/Content/themes/base/jquery-ui-1.8.12.custom.css")" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/datepicker.js")" type="text/javascript"></script>
}

@{
    ViewBag.Title = Model.Page.Title;
}

@section gallery{
    @if (Model != null && Model.PageGallery != null)
    {
        <text>@Html.Partial("_ShowGallery", Model.PageGallery)</text>
    }
}

<div class="wrap">
	<div class="content">
		<div class="in_content down clearfix">
			<div class="block">
				<h1>@Model.Page.Title</h1>
				<div class="in_block">
					@Html.Raw(Model.Page.Text)
				</div>
                @if (Model != null & Model.Gallery != null)
                {
                    var gallery = Model.Gallery;
                    <text>@Html.Partial("_ShowInnerGallery", gallery)</text>
                }
                @if (Model != null & Model.ExtraPage != null)
                {
                    <h2>@Model.ExtraPage.Title</h2>
                    <div class="in_block">
					    @Html.Raw(Model.ExtraPage.Text)
				    </div>
                }
			</div>
		</div>
	</div>
	<!--sidebar-->
	<div class="sidebar">
		<!--in_sidebar-->
		<div class="in_sidebar clearfix">
            @Html.Partial("_ReserveHallPartial", new ReserveHallModel { PeopleCount = 1 })
		</div>
		<div class="in_sidebar down clearfix">
            @if (Model.Page.SideBlocks.Count() > 0)
            {
                <ul class="promo_list">
                    @foreach (var relation in Model.Page.SideBlocks)
                    {
                        @Html.Partial("_SideBlockPartial", relation.SideBlock)
                    }
                </ul>
            }
		</div>
	</div>
</div>
